<html>
<head>
<!-- 引入 cxol 样式文件 -->
    <link rel="stylesheet" href="./cxol/cxol.css" type="text/css"></link>

    <!-- 引入 cxol.js -->
    <script src="./cxol/cx.js"></script>
    <script src="./cxol/cxol.js"></script>
</head>
    <body>
            <div id="map" style="height: 100%; width: 100%;">
            </div>
    </body>
    <script>
        window.cxol = cxol.default
        let MapBase = new cxol.ctr.mapBase({mapTarget: document.getElementById('map')})
        let OSMlayer, geoserverlayer
        let initMap = () =>
        {
            creatLayer()
            addLayer()
        }
        let creatLayer = () =>
        {
            OSMlayer = cxol.core.factory.Layer.createOSM(
                {
                source: cxol.core.factory.Source.createOSM()
                })
            geoserverlayer = cxol.core.factory.Layer.createWMS(
                {
                url: 'http://223.244.84.16:8088/geoserver/yz/wms',
                layer: 'yz:yztest1 '
                })
        }
        let addLayer = () =>
        {
            MapBase.getMap().addLayer(OSMlayer)
            MapBase.getMap().addLayer(geoserverlayer)
        }
        initMap()
    </script>
</html>


   
        

